//
//  StatisticManager.h
//  BaseProject
//
//  Created by KH_MoSi on 2020/11/5.
//  Copyright © 2020 王盼盼. All rights reserved.
//

#import <Foundation/Foundation.h>
/**
 日志发送策略
 */
typedef NS_ENUM(NSInteger, LogSendStrategy) {
    LogSendStrategyAppLaunch,//每次程序启动时发送
    LogSendStrategyDay,//每天的程序第一次进入启动
    LogSendStrategyCustom,//根据设定的时间间隔发送
};

typedef NS_ENUM(NSInteger, BA_UpdateTimeType) {
    BA_UpdateTimeType_openApp,//打开app
    BA_UpdateTimeType_loginAccount,//登录app
    BA_UpdateTimeType_logoutAccount,//登出app
    BA_UpdateTimeType_terminate//杀死app
};

NS_ASSUME_NONNULL_BEGIN

@interface StatisticManager : NSObject

/// 单例创建对象
+ (instancetype)shareManager;

/// 是否启用crash日志收集 默认YES
@property(nonatomic,assign)BOOL enableExceptionLog;

/// 发送策略 默认每天
@property(nonatomic,assign)LogSendStrategy logStrategy;

/// 新增商品浏览统计
/// @param type 1:推荐商品 2:大banner 3:icon 4小banner 5：新人专享 6栅格广告 7严选商家8工具 9左侧banner 10右侧话题
- (void)insertBrowseUserActiveQuantityWithType:(NSString *)type;

/// 新增商品浏览统计 工具类
/// @param inTime 时间戳
- (void)insertBrowseUserActiveQuantityWithToolType:(NSString *)toolType WithInTime:(NSString *)inTime;

//实时发送的时间节点
- (void)updateOnlineTimeWith:(NSTimeInterval)time Type:(BA_UpdateTimeType)type;

//查看行业分类
- (void)uploadClassCategory:(NSString *)classId;


@end

NS_ASSUME_NONNULL_END
